//
//  AccountCell.m
//  Ufan
//
//  Created by yangqingluo on 16/1/14.
//  Copyright © 2016年 yangqingluo. All rights reserved.
//

#import "AccountCell.h"

@interface AccountCell()

@property (strong, nonatomic) UIView *bottomLineView1;
@property (strong, nonatomic) UIView *bottomLineView2;

@end

@implementation AccountCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.textLabel.font = [UIFont systemFontOfSize:16.0];
        self.textLabel.textColor = [UIColor blackColor];
        
        _bottomLineView1 = [[UIView alloc] init];
        _bottomLineView1.backgroundColor = [UIColor blackColor];
        [self.contentView addSubview:_bottomLineView1];
        
        _bottomLineView2 = [[UIView alloc] init];
        _bottomLineView2.backgroundColor = [UIColor blackColor];
        [self.contentView addSubview:_bottomLineView2];
        
    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    
    _bottomLineView1.hidden = !self.showTwoLines;
    if (self.showTwoLines) {
        _bottomLineView1.frame = CGRectMake(15, self.height - 4, self.width - 30, 2);
        _bottomLineView2.frame = CGRectMake(15, self.height - 1, self.width - 30, 1);
        _bottomLineView2.backgroundColor = [UIColor blackColor];
    }
    else{
        _bottomLineView2.frame = CGRectMake(60, self.height - 1, self.width - 75, 1);
        _bottomLineView2.backgroundColor = UFCOLOR_GRAYLINE;
    }
}

+(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 60;
}

@end
